package com.itheima.reggie.domain;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Data
public class Setmeal implements Serializable {

    private Long id;//主键

    private Long categoryId;//所属分类Id

    private String name;//菜品名称

    private BigDecimal price;//价格

    private Integer status;//状态 0:停售 1:起售

    private String code;//商品ma

    private String description;//描述信息

    private String image;//图片


    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;//创建时间

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;//更新时间

    @TableField(fill = FieldFill.INSERT)
    private Long createUser;//创建用户

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateUser;//更新用户

//    @TableLogic(value = "0" ,delval = "1")
    private Integer isDeleted;

    //-----数据表中不存在下面字段，仅仅为了页面显示---
    @TableField(exist = false)
    private List<SetmealDish> setmealDishes;//菜品口味列表
    @TableField(exist = false)
    private String categoryName;//菜品分类名称


}
